-- Client Side --

/*

-- Create Logs From Database (Client Side)
function apple_tdm_logs(data)
	local LogsID = data:ReadShort()
	local LogsName = data:ReadString()
	local LogsChangeValue = data:ReadString()
	AddLogs[LogsID] = { -- This is the table that is added so it will transfer this to client side
		Logsname = LogsName,
		Logschangevalue = LogsChangeValue,
	}
end
usermessage.Hook("apple_tdm_logs", apple_tdm_logs)



-- Log View Menu
local tdm_logs = {}
function tdm_logs.initialize()
tdm_logs.MainMenuFrame = vgui.Create( "DFrame" )
tdm_logs.MainMenuFrame:SetSize( 600, 250 )
tdm_logs.MainMenuFrame:SetTitle("Team Deathmatch Menu Log Viewer" )
tdm_logs.MainMenuFrame:Center()
tdm_logs.MainMenuFrame:ShowCloseButton( false )
tdm_logs.MainMenuFrame:SetDraggable( false )
--tdm_logs.MainMenuFrame:MakePopup()
function tdm_logs.MainMenuFrame:Paint( w, h )
	draw.RoundedBox( 0, 0, 0, w, h, Color(team.GetColor(LocalPlayer():Team()).r,team.GetColor(LocalPlayer():Team()).g,team.GetColor(LocalPlayer():Team()).b,50))
	surface.SetDrawColor(0,0,0)
	surface.DrawOutlinedRect(1,1,w-1,h-1)
end

tdm_logs.DermaListView = vgui.Create("DListView")
tdm_logs.DermaListView:SetParent(tdm_logs.MainMenuFrame)
tdm_logs.DermaListView:SetPos(25, 50)
tdm_logs.DermaListView:SetSize(450, 625)
tdm_logs.DermaListView:SetMultiSelect(false)
tdm_logs.DermaListView:AddColumn("ID") -- Add column
tdm_logs.DermaListView:AddColumn("Name") -- Add column
tdm_logs.DermaListView:AddColumn("Change")
for k,v in pairs(AddLogs) do
    DermaListView:AddLine(v:Logsname(),v:Logschangevalue()) -- Add lines
end
end


 
function tdm_logs.toggleMenu()
	if tdm_logs.MainMenuFrame == nil || tdm_logs.MainMenuFrame == NULL then
		tdm_logs.initialize()
	else
		if tdm_logs.MainMenuFrame:IsVisible() then
			tdm_logs.MainMenuFrame:SetVisible(false)
		else
			tdm_logs.MainMenuFrame:SetVisible(true)
		end
	end
end
 
concommand.Add( "tdm_logs", tdm_logs.toggleMenu )

*/